package com.xu.t1.config;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;

/**
 * 线程池实例配置类
 *
 * @author xu
 *
 */

@Configuration
public class ThreadPoolConfig {
    @Bean(name = "writeExecutor")
    public ExecutorService writeExecutor() {
        // 节点最大线程数
        return Executors.newFixedThreadPool(20);
    }
}